// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package edu.uwlax.cs.oayonlinestore.entities;
/**
 * @see edu.uwlax.cs.oayonlinestore.entities.Subcategory
 */
public class SubcategoryDaoImpl
    extends edu.uwlax.cs.oayonlinestore.entities.SubcategoryDaoBase
{
    /**
     * @see edu.uwlax.cs.oayonlinestore.entities.SubcategoryDao#toSubcategoryVO(edu.uwlax.cs.oayonlinestore.entities.Subcategory, edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO)
     */
    public void toSubcategoryVO(
        edu.uwlax.cs.oayonlinestore.entities.Subcategory source,
        edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO target)
    {
        // @todo verify behavior of toSubcategoryVO
        super.toSubcategoryVO(source, target);
    }


    /**
     * @see edu.uwlax.cs.oayonlinestore.entities.SubcategoryDao#toSubcategoryVO(edu.uwlax.cs.oayonlinestore.entities.Subcategory)
     */
    public edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO toSubcategoryVO(final edu.uwlax.cs.oayonlinestore.entities.Subcategory entity)
    {
        // @todo verify behavior of toSubcategoryVO
        return super.toSubcategoryVO(entity);
    }


    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private edu.uwlax.cs.oayonlinestore.entities.Subcategory loadSubcategoryFromSubcategoryVO(edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO subcategoryVO)
    {

        edu.uwlax.cs.oayonlinestore.entities.Subcategory subcategory = this.load(subcategoryVO.getId());
        if (subcategory == null)
        {
            subcategory = edu.uwlax.cs.oayonlinestore.entities.Subcategory.Factory.newInstance();
        }
         return subcategory;
        
    }

    
    /**
     * @see edu.uwlax.cs.oayonlinestore.entities.SubcategoryDao#subcategoryVOToEntity(edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO)
     */
    public edu.uwlax.cs.oayonlinestore.entities.Subcategory subcategoryVOToEntity(edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO subcategoryVO)
    {
        // @todo verify behavior of subcategoryVOToEntity
       
        edu.uwlax.cs.oayonlinestore.entities.Subcategory entity = this.loadSubcategoryFromSubcategoryVO(subcategoryVO);
        this.subcategoryVOToEntity(subcategoryVO, entity, true);
        return entity;
    }


    /**
     * @see edu.uwlax.cs.oayonlinestore.entities.SubcategoryDao#subcategoryVOToEntity(edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO, edu.uwlax.cs.oayonlinestore.entities.Subcategory)
     */
    public void subcategoryVOToEntity(
        edu.uwlax.cs.oayonlinestore.vo.SubcategoryVO source,
        edu.uwlax.cs.oayonlinestore.entities.Subcategory target,
        boolean copyIfNull)
    {
        // @todo verify behavior of subcategoryVOToEntity
        super.subcategoryVOToEntity(source, target, copyIfNull);
    }

}